package com.example.hospital.patient.wx.api.controller;

import cn.hutool.core.bean.BeanUtil;
import com.example.hospital.patient.wx.api.Service.MedicalDeptSubService;
import com.example.hospital.patient.wx.api.common.R;
import com.example.hospital.patient.wx.api.controller.form.SearchMedicalDeptSubListForm;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * @author Baiken
 * @version 1.0
 * @description: TODO
 * @date 2024/9/15 下午1:36
 */


@RestController
@RequestMapping("/medical/dept/sub")
public class MedicalDeptSubController {

    @Resource
    private MedicalDeptSubService medicalDeptSubService;

    @PostMapping("/searchMedicalDeptSubList")
    public R searchMedicalDeptSubList(@RequestBody @Valid SearchMedicalDeptSubListForm form){
        ArrayList<HashMap> list = medicalDeptSubService.searchMedicalDeptSubList(form.getDeptId());
        return R.ok().put("result",list);
    }
}
